package com.yugao.fintech.antelope.infra.job.task;

import com.yugao.fintech.antelope.auth.AuthApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class DeleteLoginLogTask implements ITask {
    @Autowired
    private AuthApi authApi;

    /**
     * 删除多少天之前的日志
     * @param dayBefore 删除多少天之前的日志
     */
    public void exec(Integer dayBefore) {
        log.info("exec DeleteLoginLogTask req: [dayBefore: {}]", dayBefore);
        authApi.deleteLoginLog(dayBefore);
    }
}
